package scenic.geom;

/**
 * This class defines a 2-dimensional point.
 */
public class Double2 implements Cloneable {
	public double x;
	public double y;

	/**
	 * Creates a point with x = 0 and y = 0.
	 */
	public Double2() {
	}

	/**
	 * Creates a point with the given coordinates.
	 * 
	 * @param x the x coordinate.
	 * @param y the y coordinate.
	 */
	public Double2(double x, double y) {
		this.x = x;
		this.y = y;
	}
	
	public Object clone() {
		try {
			return super.clone();
		} catch (CloneNotSupportedException e) {
			return null;
		}
	}
}
